
$(document).ready(function () {

    let thisLeft_= $('.leftBox');
    myAjaxFunc({
        url:geturluser+'getAllFaq',
        type:'get',
        dataType:'json',
        mySuccess:function (data) {
            var faq=data.data.faqList,
                faqlist='';
            for(var i=0,faqq=faq.length;i<faqq;i++){
                faqlist+='<span data-content="'+faq[i].content +'">'+faq[i].name+'</span>'
            }
            thisLeft_.empty().append(faqlist);
        }
    });


    thisLeft_.on('click','span',function () {
        var this_=$(this);
        this_.parent().find('span').removeClass('clickSpan');
        this_.addClass('clickSpan');



        var content=$(this).data('content'),
            name=$(this).text(),
            str=/\\r\\n/g;
        $('#rightTitleTxt').text(name)
        $('.faqText p').html(content.replace(str,'<br>'));

    })


});






